Skip to content

Add policy_update_pattern attribute to PolicySet API#1306

Open
nithishravindra wants to merge 4 commits intomainfrom
nithish/TF-32131-update-policyset-1
Open

Add policy_update_pattern attribute to PolicySet API#1306
nithishravindra wants to merge 4 commits intomainfrom
nithish/TF-32131-update-policyset-1

Conversation

@nithishravindra
Copy link
Copy Markdown
Member

@nithishravindra nithishravindra commented Apr 8, 2026

Description

Add policy update patterns support to PolicySet create/update models and tests

Testing plan

External links

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

envchain localgo-tfe go test ./... -v -run "TestPolicySetsCreate" -tags=integration


=== RUN   TestPolicySetsCreate
=== PAUSE TestPolicySetsCreate
=== CONT  TestPolicySetsCreate
=== RUN   TestPolicySetsCreate/OPA_policy_set_with_valid_attributes
=== RUN   TestPolicySetsCreate/OPA_policy_set_with_policy_update_patterns
=== RUN   TestPolicySetsCreate/with_kind_missing
=== RUN   TestPolicySetsCreate/with_agent_enabled_missing
=== RUN   TestPolicySetsCreate/with_all_attributes_provided_-_sentinel
=== RUN   TestPolicySetsCreate/with_all_attributes_provided_-_OPA
=== RUN   TestPolicySetsCreate/with_missing_overridable_attribute
=== RUN   TestPolicySetsCreate/with_policies_and_workspaces_provided
=== RUN   TestPolicySetsCreate/with_policies,_workspaces_and_projects_provided
=== RUN   TestPolicySetsCreate/with_policies_and_excluded_workspaces_provided
=== RUN   TestPolicySetsCreate/with_vcs_policy_set
    policy_set_integration_test.go:411: Export a valid GITHUB_POLICY_SET_IDENTIFIER before running this test
=== RUN   TestPolicySetsCreate/with_vcs_policy_updated
    policy_set_integration_test.go:458: Export a valid GITHUB_POLICY_SET_IDENTIFIER before running this test
=== RUN   TestPolicySetsCreate/without_a_name_provided
=== RUN   TestPolicySetsCreate/with_an_invalid_name_provided
=== RUN   TestPolicySetsCreate/without_a_valid_organization
--- PASS: TestPolicySetsCreate (5.18s)
    --- PASS: TestPolicySetsCreate/OPA_policy_set_with_valid_attributes (0.29s)
    --- PASS: TestPolicySetsCreate/OPA_policy_set_with_policy_update_patterns (0.11s)
    --- PASS: TestPolicySetsCreate/with_kind_missing (0.10s)
    --- PASS: TestPolicySetsCreate/with_agent_enabled_missing (0.18s)
    --- PASS: TestPolicySetsCreate/with_all_attributes_provided_-_sentinel (0.13s)
    --- PASS: TestPolicySetsCreate/with_all_attributes_provided_-_OPA (0.12s)
    --- PASS: TestPolicySetsCreate/with_missing_overridable_attribute (0.11s)
    --- PASS: TestPolicySetsCreate/with_policies_and_workspaces_provided (0.98s)
    --- PASS: TestPolicySetsCreate/with_policies,_workspaces_and_projects_provided (0.94s)
    --- PASS: TestPolicySetsCreate/with_policies_and_excluded_workspaces_provided (1.47s)
    --- SKIP: TestPolicySetsCreate/with_vcs_policy_set (0.00s)
    --- SKIP: TestPolicySetsCreate/with_vcs_policy_updated (0.00s)
    --- PASS: TestPolicySetsCreate/without_a_name_provided (0.00s)
    --- PASS: TestPolicySetsCreate/with_an_invalid_name_provided (0.00s)
    --- PASS: TestPolicySetsCreate/without_a_valid_organization (0.00s)
PASS
ok      github.com/hashicorp/go-tfe     6.175s

...

Rollback Plan

Changes to Security Controls

@datadog-terraform-cloud-hashicorp
Copy link
Copy Markdown

datadog-terraform-cloud-hashicorp bot commented Apr 8, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9efa95b | Docs | Was this helpful? Give us feedback!

@nithishravindra nithishravindra marked this pull request as ready for review April 8, 2026 07:08
@nithishravindra nithishravindra requested a review from a team as a code owner April 8, 2026 07:08
@nithishravindra nithishravindra force-pushed the nithish/TF-32131-update-policyset-1 branch from 60b3276 to 6253066 Compare April 8, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants